/**
 * This is a string module
 */

static function split(raw: string, sep: string, limit: number): [ string ];

static function replace(raw: string, oldStr: string, newStr: string, count: integer): string;

static function contains(s: string, substr: string): boolean;

static function count(s: string, substr: string): integer;

static function hasPrefix(s: string, prefix: string): boolean;

static function hasSuffix(s: string, substr: string): boolean;

static function index(s: string, substr: string): integer;

static function toLower(s: string): string;

static function toUpper(s: string): string;

static function subString(s: string, start: integer, end: integer): string;

static function equals(expect: string, actual: string): boolean;

static function trim(raw: string): string;

/**
 * @param raw string
 * @param encoding string, eg: UTF-8
 * @return result bytes
 */
static function toBytes(raw: string, encoding: string): bytes;
